package com.zmn.plat.services.interfaces.contract.record;

import java.util.List;

import com.zmn.plat.model.entity.contract.record.ContractRecord;
import com.zmn.plat.model.entity.contract.record.ContractRecordQuery;
import com.zmn.plat.model.vo.contract.record.ContractRecordVO;

/**
 * 合同表
 *
 * @author linfeng
 *
 * @since 2020-05-09 11:41:45
 */
public interface ContractRecordService {
    /**
     * 根据主键查询
     * 
     * @param contractId
     *            ID
     * @return
     */
    ContractRecord findByKey(Integer contractId);

    /**
     * 查询最大的排序
     *
     * @return
     */
    Integer findMaxSort();

    /**
     * 分页搜索
     * 
     * @param query
     *            条件
     * @return 列表
     */
    List<ContractRecordVO> listPageByQuery(ContractRecordQuery query);

    /**
     * 搜索
     * 
     * @param query
     *            条件
     * @return
     */
    List<ContractRecord> listByQuery(ContractRecordQuery query);

    /**
     * 所有数据
     * 
     * @return
     */
    List<ContractRecord> listAll();

    /**
     * 统计
     * 
     * @param query
     *            条件
     * @return
     */
    Integer countByQuery(ContractRecordQuery query);

    /**
     * 更新状态
     *
     * @param contractRecord
     * @return
     */
    Integer updateStatusByKey(ContractRecord contractRecord);

    /**
     * 更新状态
     * 
     * @param ids
     * @param status
     * @param mcStaffName
     * @return
     */
    Integer updateStatusBatchByKey(List<Integer> ids, Integer status, String mcStaffName);

    /**
     * 更新
     * 
     * @param contractRecord
     * @return
     */
    Integer updateByKey(ContractRecord contractRecord);

    /**
     * 更新排序
     * 
     * @param contractId
     * @param sort
     * @param mcStaffName
     * @return
     */
    Integer updateSortByKey(Integer contractId, Integer sort, String mcStaffName);

    /**
     * 插入
     * 
     * @param contractRecord
     * @return
     */
    Integer insert(ContractRecord contractRecord);

    /**
     * 删除
     * 
     * @param contractId
     *            ID
     * @return
     */
    Integer deleteByKey(Integer contractId);

}
